<template>
  <div id="tool">
<!--    <add-rec ref="addRec"></add-rec>-->
    <div @click="go(1)" class="form">
      <div style="background: rgb(225,241,255)" class="circle">
        <img src="../../../assets/svg/form.svg" alt="">
      </div>
      <span>{{isCompany?'发布工作':'我的简历'}}</span>
    </div>
    <div @click="go(2)" class="edit">
      <div style="background: rgb(254,249,226)" class="circle">
        <img src="../../../assets/svg/edit.svg" alt="">
      </div>
      <span>{{isCompany?'投递列表':'编辑简历'}}</span>
    </div>
    <div @click="$router.push('/personal/setting')" class="setting">
      <div style="background: rgb(229,247,247)" class="circle">
        <img src="../../../assets/svg/setting.svg" alt="">
      </div>
      <span>设置</span>
    </div>
  </div>
</template>

<script>
import AddRec from "@/views/Home/Recruitment/addRec";
export default {
  name: "CardTab",
  components: {AddRec},
  data(){
    return{

    }
  },
  computed:{
    isCompany(){
      return this.$store.getters["user/getUser"].uType=='company'
    }
  },
  methods:{
    go(id){
      if(this.isCompany){
        if (id==1){
          this.$router.push("/management/company/jobManage")
        }else {
          this.$router.push("/management/company/postResume")
        }
      }else {
        if(id==1){
          this.$router.push('/myResume')
        }else {
          this.$router.push('/myResume')
        }
      }
    },
    addRec(){
      this.$refs.addRec.dialogFormVisible=true
    }
  }
}
</script>

<style lang="stylus" scoped>
#tool
  margin-top 10px
  width 100%
  height 120px
  background white
  display flex
  align-items center
  justify-content space-around
  &>div
    cursor pointer
    display flex
    flex-direction column
    justify-content space-between
    align-items center
    height 60%
    width auto
    font-size 14px
    &>div
      width 40px
      height 40px
      display flex
      justify-content center
      align-items center
      background blue

    &>div>img
      width 65%
      height 65%
.circle
  border-radius 50%
</style>
